winget: fix asset/release regexes to match correctly #475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We had a couple issues in our
release-winget
pipeline that were obfuscated by the error we were getting fromwingetcreate
(fixed with #206) and some confusion with PowerShell variables:We were matching on
.exe
, meaning we matched on both the Git and PortableGit assets. This causedwingetcreate
to attempt to update theMicrosoft.Git
manifest with both assets and return the initial error that tipped us off to something being amiss:Updating a manifest is only supported with the same number of installer URLs.
This has been fixed by instead matching on64-bit.exe
.We were trying to match on the
$assets
variable, which does not exist in this version of the script. This caused the initial value of$Matches[0]
to be saved to the$version
variable, and the version that the Microsoft.Git manifest was updated to was64-bit.exe
, rather than2.34.1.0.0
. This was corrected by updating$assets
to$github.release
.Here is a repro of the initial failure described in item 1 above:
https://github.com/ldennington/git/runs/4512447452?check_suite_focus=true
Here is a repro of the version error described in item 2 above:
https://github.com/ldennington/git/runs/4513024477?check_suite_focus=true
Here is a successful run with the fixes in place:
https://github.com/ldennington/git/runs/4513446852?check_suite_focus=true